import { RouteRecordRaw } from 'vue-router'
import Layout from '@/layouts/index.vue'

const componentsRouter: RouteRecordRaw = {
  path: '/components',
  component: Layout,
  redirect: '/components/table',
  name: 'components',
  meta: { title: '组件', icon: 'el-icon-receiving', noCache: true },
  children: [
    {
      path: '/components/table',
      component: () => import('@/views/components-demo/table/index.vue'),
      name: 'ComponentsTable',
      meta: { title: '表格组件' }
    },
    {
      path: '/components/form',
      component: () => import('@/views/components-demo/form/index.vue'),
      name: 'ComponentsForm',
      meta: { title: '表单组件' }
    }
  ]
}

export default componentsRouter
